package pw.mcdarc.mc.bython.Nms.v1_8_R3;

import net.minecraft.server.v1_8_R3.ChatMessage;
import pw.mcdarc.mc.bython.Nms.v1_8_R3.Chat.ChatMessageFactory;

public class NMS {

    /**
     * 获取工具类
     *
     * @return 工具类实例
     */
    public Tools getTools() {
        try {
            return Tools.class.newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    /**
     * 获取构造类
     *
     * @return 构造类实例
     */
    public Builder getBuilder() {
        try {
            return Builder.class.newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    /**
     * 获取ChatMessage工厂类
     *
     * @param msg 用于构造工厂类的消息内容
     * @return 工厂类实例
     */
    public ChatMessageFactory getChatMessageFactory(ChatMessage msg) {
        return new ChatMessageFactory(msg);
    }
}
